﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// KhauPhanAn Repository. Good example of CRUD operations.
    ///// </summary>
    public class KhauPhanAnRepository : IKhauPhanAnRepository
    {
        private static readonly IKhauPhanAnDao _khauPhanAn = DataAccess.KhauPhanAnDao;
        public List<KhauPhanAn> GetList()
        {
            return _khauPhanAn.GetKhauPhanAn().ToList();
        }

        public KhauPhanAn Get(string id)
        {
            return _khauPhanAn.GetKhauPhanAnByID(id);
        }

        public void Insert(KhauPhanAn t)
        {
            _khauPhanAn.InsertKhauPhanAn(t);
        }

        public void Update(KhauPhanAn t)
        {
            _khauPhanAn.UpdateKhauPhanAn(t);
        }

        public void Delete(KhauPhanAn t)
        {
            _khauPhanAn.DeleteKhauPhanAn(t);
        }
    }
}